package com.qf.smsplatform.common.exception;

import com.qf.smsplatform.common.enums.SmsEnum;

/**
 * 出现问题时，需要抛出的异常信息
 * @author zjw
 */
public class SmsException extends RuntimeException {

    private Integer code;

    public SmsException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public SmsException(SmsEnum smsEnum) {
        super(smsEnum.getMsg());
        this.code = smsEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
